
class Shape {
    public void draw() {
        System.out.println("画图形");
    }
}

class Rect extends Shape {
    public void draw() {
        System.out.println("画矩形");
    }
}

class Circle extends Shape {
    public void draw() {
        System.out.println("画圆形");
    }
}

class Flower extends Shape {
    public void draw() {
        System.out.println("画❀");
    }
}

public class Test2 {

    public static void draw(Shape shape) {
        shape.draw();
    }

    public static void main(String[] args) {
        Rect rect = new Rect();
        Circle circle = new Circle();
        Flower flower = new Flower();
        draw(rect);
        draw(circle);
        draw(flower);

    }

}
